public class code {
    public static void PaiXu(int[] arr){
        int sz = arr.length;
        for(int i = 0; i < sz - 1; i++){
            for(int j = 0;j < sz - i - 1 ; j++){
                if(arr[j] > arr[j+1]){
                    int temp = arr[j];
                    arr[j] = arr[j+1];
                    arr[j+1] = temp;
                }
            }
        }
    }
    public static void main(String[] args) {
        int[] arr = {10,9,8,7,6,5,4,3,2,1};
        for(int x : arr){
            System.out.print(x + " ");
        }
        System.out.println();
        PaiXu(arr);
        for(int x : arr){
            System.out.print(x + " ");
        }
    }
}
